package com.tuanzi.loan.web.lazy.accountTool;

import org.springframework.data.domain.Page;

import com.tuanzi.loan.business.service.accountTool.AccountBillService;
import com.tuanzi.loan.core.lazy.BaseLazyDataModel;
import com.tuanzi.loan.core.util.SpringContextHolder;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.accountTool.AccountBillSearchRequest;
import com.tuanzi.loan.vo.response.accountTool.AccountBillResponse;

public class AccountBillLazyDataModel extends BaseLazyDataModel<AccountBillSearchRequest, AccountBillResponse> {

	private static final long serialVersionUID = 3610077955662606238L;
	
	private AccountBillService accountBillService = SpringContextHolder.getBean(AccountBillService.class);

	public AccountBillLazyDataModel(AccountBillSearchRequest searchRequest) {
		super(searchRequest);
	}

	@Override
	protected Page<AccountBillResponse> doLoad(
			PageSearcher<AccountBillSearchRequest> pageSearcher) {
		return accountBillService.list(pageSearcher);
	}

}
